@include('admin.public.head')
@include('admin.public.pop')

<div class="ibox-title">
    <h5>vip的使用詳情</h5>
</div>

<div class="col-sm-12">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <a href="/user_vip/{{$user_id}}" class="btn btn-primary">返回vip列表</a>
            {{ $user_vip_info->appends(Request::except('page'))->links() }}
            <div class="row">
                <div class="col-sm-12 pull-right m-b-xs">
                    <form action="">
                        <div class="col-sm-1  m-b-xs text-center pull-right">
                            <button type="submit" class="btn btn-sm btn-primary">搜索</button>
                            </span>
                        </div>

                        <div class="col-sm-1 text-center pull-right">
                            <input type="text" name="class_name" value="{{$class_name}}" placeholder="課程名稱" class="input form-control">
                        </div>

                        @include('admin.public.common.where_time_input')

                    </form>
                </div>
            </div>
            <div class="table-responsive">

                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>課程名稱</th>
                        <th>vip卡名稱</th>
                        <th>是否限制</th>
                        <th>預約前次數</th>
                        <th>預約后次數</th>
                        <th>創建時間</th>
                        <th>備注</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($user_vip_info as $v)
                        <tr>
                            <td>
                                {{$v->class_name??''}}
                            </td>
                            <td>
                                {{$v->user_vip_name??''}}
                            </td>
                            <td>
                                @if(empty($v->is_restriction)) 無限制 @else 有限制 @endif
                            </td>
                            <td>
                                {{$v->before_num??''}}
                            </td>
                            <td>
                                {{$v->after_num??''}}
                            </td>
                            <td>
                                {{$v->created_at??''}}
                            </td>
                            <td>
                                {{$v->remark??''}}
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
            {{ $user_vip_info->appends(Request::except('page'))->links() }}
        </div>
    </div>
</div>
